public class Star {
    public static void main(String[] args) {

        //第一种情况
        /*int i = 0;
        while (i < 6) {
            int j = 0;
            while (j <= i) {
                System.out.printf("*");
                j++;
            }
            System.out.println("");
            i++;
        }*/

        //第二种情况
       /* int i = 0;
        while (i < 6) {
            int j = 6, k = 0;
            while (j > i) {
                System.out.print("*");
                j--;
            }
            System.out.println("");
            i++;
            while (i > k) {
                System.out.print(" ");
                k++;
            }
        }*/

        //第三种情况
/*        int i = 0;
        while (i < 6) {
            int j = 6, k = 0;
            while (i < j) {
                System.out.print(" ");
                j--;
            }
            i++;
            while (k < i) {
                System.out.print("*");
                k++;
            }
            System.out.println("");
        }*/

        //第四种情况
        int i = 1;
        while (i <= 6) {
            int j = 1, k = 1;
            while (j <= 6 - i) {
                System.out.print(" ");
                j++;
            }
            while (k <= 2 * i - 1) {
                System.out.print("*");
                k++;
            }
            i++;
            System.out.println("");
        }
    }
}
